<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>kisebo: Código-Fonte de F:/Projetos/Rodrigo/kisebo/src/kisebo/Interesse.cpp</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Gerado por Doxygen 1.5.7.1 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Página&nbsp;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
      <li><a href="dirs.html"><span>Diretórios</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>Lista&nbsp;de&nbsp;Arquivos</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_e5fb231306b426dbf7288f735af63cb9.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_8c0497d54df0514193af848d7b3013ef.html">kisebo</a>
  </div>
</div>
<div class="contents">
<h1>Interesse.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include "Interesse.h"</span>
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;iostream&gt;</span>
<a name="l00004"></a>00004 
<a name="l00005"></a><a class="code" href="class_interesse.html#fa656aa68f03a5d8e9263c14be8322af">00005</a> <a class="code" href="class_interesse.html#fa656aa68f03a5d8e9263c14be8322af" title="Construtor padrão. Utilizado para instanciar um novo interesse.">Interesse::Interesse</a>()
<a name="l00006"></a>00006 {
<a name="l00007"></a>00007         this-&gt;<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a> = <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee745147413b50102137da80f96204fb1c">Interesse::DESCONHECIDO</a>;
<a name="l00008"></a>00008         this-&gt;<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a> = <span class="stringliteral">"\0"</span>;
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 }
<a name="l00011"></a>00011 
<a name="l00012"></a><a class="code" href="class_interesse.html#9f25ed25de00364fd7c191faf07622f4">00012</a> <a class="code" href="class_interesse.html#fa656aa68f03a5d8e9263c14be8322af" title="Construtor padrão. Utilizado para instanciar um novo interesse.">Interesse::Interesse</a>(<span class="keyword">const</span> <a class="code" href="class_interesse.html" title="Classe para controle dos Interesses.   Utilizar uma pesquisa por interesse, dessa...">Interesse</a> &amp;_copia){
<a name="l00013"></a>00013 
<a name="l00014"></a>00014         this-&gt;<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a> = _copia.<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a>;
<a name="l00015"></a>00015         this-&gt;<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a> = _copia.<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a>;
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 }
<a name="l00018"></a>00018 
<a name="l00019"></a><a class="code" href="class_interesse.html#e902fc361052624775520898a083c314">00019</a> <a class="code" href="class_interesse.html#e902fc361052624775520898a083c314" title="Destrutor. Remove a instancia do objeto, para liberar mémoria.">Interesse::~Interesse</a>()
<a name="l00020"></a>00020 {
<a name="l00021"></a>00021 }
<a name="l00022"></a>00022 
<a name="l00023"></a><a class="code" href="class_interesse.html#d825535816dfce19de17ccac30ab273f">00023</a> <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee" title="Enumerator com o tipo de interesse da pesquisa. Enumerator para controlar o tipo...">Interesse::ENUM_INTERESSE</a> <a class="code" href="class_interesse.html#d825535816dfce19de17ccac30ab273f" title="Obtem o tipo de interesse.">Interesse::GetTipo</a>(){ <span class="keywordflow">return</span> <a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a>;}
<a name="l00024"></a><a class="code" href="class_interesse.html#258fc458248131c9e908a16e49d15c01">00024</a> <span class="keywordtype">void</span> <a class="code" href="class_interesse.html#258fc458248131c9e908a16e49d15c01" title="Insere o tipo de interesse.">Interesse::SetTipo</a>(<a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee" title="Enumerator com o tipo de interesse da pesquisa. Enumerator para controlar o tipo...">ENUM_INTERESSE</a> _tipo){ this-&gt;<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a> = _tipo; }
<a name="l00025"></a>00025 
<a name="l00026"></a><a class="code" href="class_interesse.html#5fc544b08bc91bd159af77d51cc69bb6">00026</a> <span class="keywordtype">string</span> <a class="code" href="class_interesse.html#5fc544b08bc91bd159af77d51cc69bb6" title="Obtem o valor(chave) do interesse.">Interesse::GetValor</a>(){ <span class="keywordflow">return</span> <a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a>; }
<a name="l00027"></a><a class="code" href="class_interesse.html#48179f3212f9f9347ee25984c064b74c">00027</a> <span class="keywordtype">void</span> <a class="code" href="class_interesse.html#48179f3212f9f9347ee25984c064b74c" title="Insere o valor(chave).">Interesse::SetValor</a>(<span class="keywordtype">string</span> _valor){ this-&gt;<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a> = _valor; }
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="class_interesse.html#121102af2e49274b56b59418a7a4ca7b">00029</a> <span class="keywordtype">bool</span> <a class="code" href="class_interesse.html#121102af2e49274b56b59418a7a4ca7b" title="Método para verificar se dois Interesses são diferentes.">Interesse::operator!=</a>(<a class="code" href="class_interesse.html" title="Classe para controle dos Interesses.   Utilizar uma pesquisa por interesse, dessa...">Interesse</a> &amp;_interesse){
<a name="l00030"></a>00030 
<a name="l00031"></a>00031         <span class="keywordflow">if</span>(this-&gt;<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a> != _interesse.<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00032"></a>00032         <span class="keywordflow">if</span>(this-&gt;<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a> != _interesse.<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a>) <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00033"></a>00033 
<a name="l00034"></a>00034         <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 }
<a name="l00037"></a>00037 
<a name="l00038"></a><a class="code" href="class_interesse.html#ad401ea18fc95338440b972b705d2a61">00038</a> ostream&amp; operator &lt;&lt;(ostream &amp;_out, <span class="keyword">const</span> <a class="code" href="class_interesse.html" title="Classe para controle dos Interesses.   Utilizar uma pesquisa por interesse, dessa...">Interesse</a> &amp;_interesse){
<a name="l00039"></a>00039 
<a name="l00040"></a>00040         _out &lt;&lt; <span class="stringliteral">"Interesse por "</span>;
<a name="l00041"></a>00041 
<a name="l00042"></a>00042         <span class="keywordflow">switch</span>(_interesse.<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a>){
<a name="l00043"></a>00043 
<a name="l00044"></a>00044         <span class="keywordflow">case</span> <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee6c2a819f42326edf303baf7c6b8af153">Interesse::AUTOR</a>:
<a name="l00045"></a>00045                 _out &lt;&lt; <span class="stringliteral">"Autor"</span>;
<a name="l00046"></a>00046                 <span class="keywordflow">break</span>;
<a name="l00047"></a>00047 
<a name="l00048"></a>00048         <span class="keywordflow">case</span> <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee9e2e36b021078a1556e3bb11abd106a8">Interesse::TEMA</a>:
<a name="l00049"></a>00049                 _out &lt;&lt; <span class="stringliteral">"Tema"</span>;
<a name="l00050"></a>00050                 <span class="keywordflow">break</span>;
<a name="l00051"></a>00051 
<a name="l00052"></a>00052         <span class="keywordflow">case</span> <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faeedf15a90d9925f3db4accd114129ad2f8">Interesse::TITULO</a>:
<a name="l00053"></a>00053                 _out &lt;&lt; <span class="stringliteral">"Titulo"</span>;
<a name="l00054"></a>00054                 <span class="keywordflow">break</span>;
<a name="l00055"></a>00055 
<a name="l00056"></a>00056         <span class="keywordflow">case</span> <a class="code" href="class_interesse.html#2d5c4f4dad53f3924cf26d131036faee745147413b50102137da80f96204fb1c">Interesse::DESCONHECIDO</a>:
<a name="l00057"></a>00057                 _out &lt;&lt; <span class="stringliteral">"Desconhecido"</span>;
<a name="l00058"></a>00058                 <span class="keywordflow">break</span>;
<a name="l00059"></a>00059         }
<a name="l00060"></a>00060 
<a name="l00061"></a>00061         _out &lt;&lt; endl &lt;&lt; <span class="stringliteral">"codigo: "</span> &lt;&lt; _interesse.<a class="code" href="class_interesse.html#776c45dc790c74d10d74960b1f883c87">tipo</a> &lt;&lt; endl;
<a name="l00062"></a>00062         _out &lt;&lt; <span class="stringliteral">"chave: "</span> &lt;&lt; _interesse.<a class="code" href="class_interesse.html#2c571d79ca9c2aa30a752555c78e1b71">valor</a> &lt;&lt; endl &lt;&lt; endl;
<a name="l00063"></a>00063 
<a name="l00064"></a>00064         <span class="keywordflow">return</span> _out;
<a name="l00065"></a>00065 
<a name="l00066"></a>00066 }
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Gerado em Wed Dec 3 04:35:41 2008 para kisebo por&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>
